package top.yxqz.listener.demo1;

import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;

/**
 * @author Mr.余
 * @date 2022/12/7
 * @package top.yxqz.listener.demo1
 * 监听请求域对象
 */
public class MyServletRequestListener implements ServletRequestListener {

    /**
     * 销毁request请求域对象
     * @param servletRequestEvent
     */
    @Override
    public void requestDestroyed(ServletRequestEvent servletRequestEvent) {
        System.out.println("Request域对象被创建了");
    }

    /**
     * 创建request域对象
     * @param servletRequestEvent
     */
    @Override
    public void requestInitialized(ServletRequestEvent servletRequestEvent) {

    }
}
